import { createStore, applyMiddleware } from 'redux'
import reducer from './reducer'
import { createLogger } from 'redux-logger'
import { createAddUserAction } from './action/usersAction'

// 直接使用
// import logger from 'redux-logger'
// const store = applyMiddleware(logger)(createStore)(reducer)

// 配置使用
const logger = createLogger({})
const store = applyMiddleware(logger)(createStore)(reducer)

store.dispatch(createAddUserAction({ id: 99, name: 'xx', age: 99 }))